package com.insigma.business.qrcode.common.dto;


import com.insigma.business.qrcode.common.vo.DescEnum;

import java.util.LinkedHashMap;
import java.util.Map;


public enum SoldierTypeEnum implements DescEnum {

    
    RETIRED("退役士兵"),

    
    DEMOBILIZED("复员军人"),

    
    ARMY_CADRES("军队转业干部"),

    
    MARTYR_FAMILY_DEPENDANT("烈士遗属"),

    
    ACTIVE_SOLDIER_FAMILY_MEMBER("现役军人家属"),

    
    ILL_DEATH_FAMILY_DEPENDANT("病故军人遗属"),

    
    DISABLED("残疾军人"),

    
    RETIRED_MILITARY_CADRE("军队离退休干部"),

    
    RETIRED_SERGEANT("退休士官"),

    
    RETIRED_OFFICER("退役军官"),

    
    JOB_SACRIFICE_FAMILY_DEPENDANT("因公牺牲军人遗属"),

    
    DISABLED_MILITIA_WORKERS("伤残民兵民工"),

    
    RETIRED_STAFF_WITHOUT_MILITARY_STATUS("军队无军籍离退休退职职工"),

    
    ACTIVE_DUTY_SOLDIER("在职"),


    VETERANS_SOLDIER("退役军人"),

    COLLEGE_STUDENT("在校大学生"),
     ;

    
    private String desc;

    SoldierTypeEnum(String desc) {
        this.desc = desc;
    }

    
    public static SoldierTypeEnum getByEnumName(final String enumName) {
        for (SoldierTypeEnum element : values()) {
            if (element.name().equals(enumName)) {
                return element;
            }
        }
        return null;
    }

    
    public static Map<String,String> getName2TitleMap(){

        Map<String,String> name2TitleMap = new LinkedHashMap<>();

        for (SoldierTypeEnum element : values()) {
            name2TitleMap.put(element.name(),element.desc);
        }

        return name2TitleMap;
    }

    @Override
    public String getDesc() {
        return this.desc;
    }


}
